fix(pixi-build-python): clarify missing pyproject error#5922
Open
lawrence3699 wants to merge 2 commits intoprefix-dev:mainfrom
Open
fix(pixi-build-python): clarify missing pyproject error#5922lawrence3699 wants to merge 2 commits intoprefix-dev:mainfrom
lawrence3699 wants to merge 2 commits intoprefix-dev:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves UX for pixi-build-python by surfacing a dedicated, actionable error when a project is missing pyproject.toml, instead of bubbling up a low-level file I/O error during metadata loading.
Changes:
- Added a
MissingPyProjectTomlMetadataErrorvariant with a clearer message and diagnostic help text. - Updated manifest loading to map
ErrorKind::NotFoundto the new dedicated error. - Added a regression test asserting both the error variant and message content when
pyproject.tomlis absent.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
baszalmstra
approved these changes
Apr 19, 2026
Contributor
|
Thanks this is a great ux improvement! |
Contributor
|
Perhaps one improvement would be if we could surface this error earlier, I think we could surface this in the first few lines of recipe generation. Because now the error still includes that it could read a certain metadata like the homepage. But the backend cannot work without a pyproject. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5871
When
pixi-build-pythonis used without apyproject.toml, metadata loading currently fails with a raw file-open error while reading package metadata.This changes the metadata provider to surface a dedicated error that states that
pixi-build-pythonrequires apyproject.tomland points at the missing path.Validation:
cargo fmt --all --checkcargo test -p pixi-build-python metadata::tests:: -- --nocapture